<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
	<head>
    <title><%= @title_tag || AppSettings['settings.site_name'] %></title>

    <meta http-equiv="content-type" content="text/xhtml; charset=utf-8" />
    <meta http-equiv="imagetoolbar" content="no" />
    <meta name="distribution" content="all" />
    <meta name="robots" content="all" />
    <meta name="resource-type" content="document" />
    <meta name="MSSmartTagsPreventParsing" content="true" />
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <%= stylesheet_link_tag 'application', "data-turbolinks-track" => true %>
    <%= javascript_include_tag "application", "data-turbolinks-track" => true %>
    <%#= timeago_script_tag %>

    <%#= @feed_link.html_safe if @feed_link %>
    <link href='//fonts.googleapis.com/css?family=Droid+Sans:400,700|Droid+Serif:400,700|Lobster' rel='stylesheet' type='text/css'>

    <%= csrf_meta_tags %>
    <%#= favicon_link_tag 'favicon.ico' %>
    <%= cloudinary_js_config %>

		<%= render 'layouts/google_analytics' %>

    <script data-turbolinks-eval="false">
		$(document).ready(function(){
		  $('form').find("input").each(function(ev)
		  {
		    if($(this).next("span")) {
		     $(this).attr("placeholder", $(this).attr("placeholder") + " " + $(this).next("span").text());
				 $(this).addClass('placeholder-error');
				 $(this).next("span").hide();
		  	}
		  });
		});

		</script>

		<style>
		//  === WIDGET CONTENT STYLES ===

		.widget-bg {
		  background-color: #eee;
		}

		.widget-footer {
		  margin-top: 200px;
		}

		label {
		  display: none;
		}

		.placeholder-error::-webkit-input-placeholder {
		    color: #red;
		}

		div.widget-form > div.add-form {
		  margin-top: 0;
		}

		.topic-placeholder::-webkit-input-placeholder {
		   color: #999;
		}

		.topic-placeholder:-moz-placeholder { /* Firefox 18- */
		   color: #999;
		}

		.topic-placeholder::-moz-placeholder {  /* Firefox 19+ */
		   color: #999;
		}

		.topic-placeholder:-ms-input-placeholder {
		   color: #999;
		}
		</style>
	</head>

  <body>
    <script>
      ga('set', 'location', location.href.split('#')[0]);
      ga('send', 'pageview', { "title": document.title });
    </script>
    <div id="body-wrapper" class="container">
				<% Globalize.with_locale(@locale) do %>
				  <div class="widget-form">
						<%= yield %>
					</div>
				<% end %>
		</div>
  </body>
</html>
